package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.Tag;

import java.util.List;

public interface TagService {

    /**
     * 保存标签信息
     *
     * @param tag 标签信息
     * @throws BusinessException
     */
    void saveTag(Tag tag) throws BusinessException;

    /**
     * 修改标签
     * @param tag
     * @throws BusinessException
     */
    void modifyTag(Tag tag) throws BusinessException;

    /**
     * 查询所有的标签
     *
     * @return
     * @throws BusinessException
     */
    List<Tag> getAllTags() throws BusinessException;

    /**
     * 根据id删除标签
     *
     * @param id 标签id
     * @throws BusinessException
     */
    void removeTagById(Long id) throws BusinessException;

    /**
     * 分页查询标签
     *
     * @return
     * @throws BusinessException
     */
    List<Tag> getTagsByPage(int pageIndex, int pageSize) throws BusinessException;

    /**
     * 查询总数
     *
     * @return
     * @throws BusinessException
     */
    int getTotal() throws BusinessException;
}
